package com.sxy.demo.sxy;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * @author: ly
 * @date: 2022/10/26 10:27
 */
@Data
@ApiModel(value = "竞价商品区详情查看返回Feign(库存)")
@NoArgsConstructor
@AllArgsConstructor
@Builder(toBuilder = true)
/**
 *    SELECT
 *             ssk.*,
 *             br.id AS goodsBidRecordId
 *         FROM
 *             rms_goods_supplier_sku ssk
 *             LEFT JOIN rms_goods_bid_record br ON ssk.id = br.supplier_sku_id
 *             AND br.deleted = 0
 *             AND br.bid_state = 10
 *         WHERE
 *             ssk.deleted = 0
 *             AND ssk.supply_state != 0
 *             <if test="goodsType == 1 ">
 *                 AND ssk.goods_sku_state IN (20, 30, 40 )
 *             </if>
 *             <if test="goodsType == 2 ">
 *                 AND ssk.goods_sku_state = 20
 *             </if>
 *             AND ssk.goods_sku_code IN
 *         <foreach collection="skuCodeList" item="item" index="index" open="(" separator="," close=")">
 *             #{item}
 *         </foreach>
 */
public class BidRegionGoodsSupplierSkuItemVO {

    @ApiModelProperty(value = "商家商品skuId")
    private Long id;

    /**
     * 商家商品spu_id
     */
    @ApiModelProperty(value = "商家商品spu_id")
    private Long supplierSpuId;
    /**
     * 商品标准sku_id
     */
    @ApiModelProperty(value = "商品标准sku_id")
    private Long goodsSkuId;
    /**
     * sku编码
     */
    @ApiModelProperty(value = "sku编码")
    private String goodsSkuCode;

    /**
     * 供货商id
     */
    @ApiModelProperty(value = "供货商id")
    private Long supplierId;

    /**
     * 总库存
     */
    @ApiModelProperty(value = "总库存")
    private Integer totalStock;
    /**
     * 库存
     */
    @ApiModelProperty(value = "库存")
    private Integer stock;
    /**
     * 增减库存
     */
    @ApiModelProperty(value = "增减库存")
    private Integer stockNum;
    /**
     * 自编码
     */
    @ApiModelProperty(value = "自编码")
    private String selfCode;
    /**
     * 条形码
     */
    @ApiModelProperty(value = "条形码")
    private String barCode;
    /**
     * 供货价
     */
    @ApiModelProperty(value = "供货价")
    private BigDecimal supplyPrice;

    /**
     * 吊牌价
     */
    @ApiModelProperty(value = "吊牌价")
    private BigDecimal originalPrice;
    /**
     * 供应商建议零售价
     */
    @ApiModelProperty(value = "供应商建议零售价")
    private BigDecimal suggestedRetailPrice;
    /**
     * 批发毛利
     */
    @ApiModelProperty(value = "批发毛利")
    private BigDecimal wholesaleGrossProfit;
    /**
     * 批发净利
     */
    @ApiModelProperty(value = "批发净利")
    private BigDecimal wholesaleClearProfit;
    /**
     * 批发毛利率
     */
    @ApiModelProperty(value = "批发毛利率")
    private BigDecimal wholesaleGrossProfitRate;
    /**
     * 批发净利率
     */
    @ApiModelProperty(value = "批发净利率")
    private BigDecimal wholesaleClearProfitRate;
    /**
     * 零售毛利
     */
    @ApiModelProperty(value = "零售毛利")
    private BigDecimal retailGrossProfit;
    /**
     * 零售净利
     */
    @ApiModelProperty(value = "零售净利")
    private BigDecimal retailClearProfit;
    /**
     * 零售毛利率
     */
    @ApiModelProperty(value = "零售毛利率")
    private BigDecimal retailGrossProfitRate;
    /**
     * 零售净利率
     */
    @ApiModelProperty(value = "零售净利率")
    private BigDecimal retailClearProfitRate;
    /**
     * 已售数量
     */
    @ApiModelProperty(value = "已售数量")
    private Integer soldQuantity;
    /**
     * 图片地址
     */
    @ApiModelProperty(value = "图片地址")
    private String imageUrl;
    /**
     * 商品状态(商家常规商品状态)；10-待提交，20-审核中，30-竞价失败，40-竞价成功，50-已下架
     */
    @ApiModelProperty(value = "商品状态(商家常规商品状态)；10-待提交，20-审核中，30-竞价失败，40-竞价成功，50-已下架")
    private Integer goodsSkuState;
    /**
     * 是否参与竞价；0-否，1-是
     */
    @ApiModelProperty(value = "是否参与竞价；0-否，1-是")
    private Integer bidState;
    /**
     * 供货状态：0-取消供货,1-参与供货,2-自主供货
     */
    @ApiModelProperty(value = "供货状态：0-取消供货,1-参与供货,2-自主供货")
    private Integer supplyState;
    /**
     * 标准类型；0-非标准链接，1-准标准链接，2-标准链接
     */
    @ApiModelProperty(value = "标准类型；0-非标准链接，1-准标准链接，2-标准链接")
    private String standardType;
    /**
     * 运费模板
     */
    @ApiModelProperty(value = "运费模板")
    private Long freightTemplateId;

    @ApiModelProperty(value = "竞价成功记录id")
    private Long goodsBidRecordId;

    @ApiModelProperty(value = "商品是否有效（feign接口使用）: 1-有效，2-无效")
    private Integer isGoodsValid;


    /**
     * @see BidRegionGoodsSupplierSkuItemVO#supplierId
     */
    private MemberSupplierAudit memberSupplierAudit;


    /**
     * @see BidRegionGoodsSupplierSkuItemVO#supplierId
     */
    private Shops shops;

}
